package com.yss.sofa.ide.builder.dbscript.ui.wizard;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;

import com.yss.sofa.ide.builder.dbscript.ui.composite.DataSourceComposite;
import com.yss.sofa.ide.ui.wizard.BaseWizardPage;

/**
 * @author huangsq
 * @version 1.0, 2013-11-15
 * @since 1.0, 2013-11-15
 */
public class TargetDataSourcePage extends BaseWizardPage {
  public static final String ID = "TargetDataSourcePage";

  /**
   * Create the wizard.
   */
  public TargetDataSourcePage() {
    super(ID);
    setTitle("设置目标数据源");
    setDescription("设置目标数据源");
  }

  /**
   * Create contents of the wizard.
   * 
   * @param parent
   */
  public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);

    container.setLayout(new GridLayout(1, false));

    TabFolder tabFolder = new TabFolder(container, SWT.NONE);
    tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    TabItem tbtmOracledb = new TabItem(tabFolder, SWT.NONE);
    tbtmOracledb.setText("DB2");

    DataSourceComposite globalTypeMapping = new DataSourceComposite(tabFolder, SWT.NONE);
    tbtmOracledb.setControl(globalTypeMapping);

    TabItem tbtmOraclemssql = new TabItem(tabFolder, SWT.NONE);
    tbtmOraclemssql.setText("MSSQL");

    DataSourceComposite globalTypeMapping_1 = new DataSourceComposite(tabFolder, SWT.NONE);
    tbtmOraclemssql.setControl(globalTypeMapping_1);

    setControl(container);
  }

  public boolean finishButtonPressed() {
    return false;
  }
}
